<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validators/news.js"></script>


 <div class="f_l margin1" style="width:100%">
    <div style="height:24px;color:red" align="center" id="errorInfo">${failInfo }</div>
   	<div style="height:24px;color:red;font-weight:bold" align="left">新增新闻</div>
    <s:form enctype="multipart/form-data" id="submitForm" action="news!save" method="post" theme="simple">
   	<table>
   		<tbody>
   			<tr>
   				<td width="10%"><s:text name="新闻标题"/>：</td>
   				<td><input type="text" name="news.title" /></td>
   			</tr>
   			<tr>
   				<td><s:text name="标题图片"/>：</td>
   				<td>
   				  <div><input type="file" name="news.attachments[0].file"/></div>
   				</td>
   			</tr>
   			<tr>
   				<td><s:text name="新闻类别"/>：</td>
   				<td>
   					<select name="news.type">
   				      <option value="1">-- 公司新闻 --</option>
   				      <option value="2">-- 行业动态 --</option>
   				    </select>  
   				</td>
   			</tr>
   			<tr>
   			    <td><s:text name="新闻简述"/>：</td>
   				<td><textarea rows="4" cols="50" name="news.brief"></textarea></td>
   			</tr>
   			<tr>
   				<td><s:text name="新闻正文"/>：
   				</td><td><textarea rows="8" cols="50" name="news.content"></textarea></td>
   			</tr>
   			<tr> 
   				<td align="left">
   					<input type="submit" value="确认" onclick="return doValidate(event);" />
  				</td>
   				<td align="left">
   					<input type="button" value="取消" onclick="javascript:history.back(-1);"/>
   				</td>
   			 </tr>
   		</tbody>
   	</table>
   	<ckeditor:replace replace="news.content" basePath="../ckeditor" />
    </s:form>
  </div>
  